package com.tencreat.common.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * 订单类型枚举
 * @author huangwei
 */
@Getter
public enum OrderType {

    /**
     * 订单类型枚举
     */
    SHOP(1,"商城订单"),
    STORE(2,"店铺订单"),
    NOT(4,"未知"),
    RECHARGE(7,"充值"),
    WITHDRAW(8,"提现"),
    ACCOUNT_RECHARGE(9, "账户充值"),
    RETURNS_REFUND(27,"退货退款"),
    REFUND(28,"退款"),
    QR_CODE_ORDER(29,"扫码订单"),
    ;

    OrderType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @EnumValue
    private final int value;
    @JsonValue
    private String desc;

    /**
     * 单个枚举的展示
     */
    @Override
    public String toString() {
        return value + "-" + desc;
    }
}
